n = int(input())
qualified = 0
excellent = 0
for i in range(n):
    score = int(input())
    if score >= 60:
        qualified +=1
    if score >=85:
        excellent+=1
print("{:.0f}".format(100 * qualified/n) + "%")
print("{:.0f}".format(100 * excellent/n)+ "%")
